package com.xbongbong.sso.domain.dao;

import com.xbongbong.sso.domain.entity.OauthStepEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface OauthStepDao {
    Long insert(OauthStepEntity entity);

    void insertBatch(List<OauthStepEntity> list);

    OauthStepEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid );

    Integer update(OauthStepEntity entity);

    List<OauthStepEntity> findEntities(@Param("param") Map<String, Object> param);

    Integer getEntitiesCount(@Param("param") Map<String, Object> param);

    OauthStepEntity getEntity(@Param("corpid") String corpid, @Param("connectorId") Long connectorId,
                              @Param("stepType") Integer stepType);
}